DMA may allow certain hardware subsystems, such as those within a processor or microcontroller, to access main system memory, such as random-access memory (RAM), independent of the CPU. Without DMA, when a CPU uses routines to read or write data, the CPU is typically fully occupied for the entire duration of the read or write operation, and is thus unavailable to perform other work. With DMA, the CPU first initiates the transfer and performs other tasks while the transfer is in progress until an interrupt is received from the DMA controller when the operation is done. DMA is used by various peripherals within processors and microcontrollers, and may be used for tasks such as data writes to and from secondary memory, graphics, networking, or other tasks. DMA may also be used for intra-chip data transfer in multi-core processors. DMA may be also used to copy data within memory itself.
Processors, microcontrollers, microcontroller units (MCU), central processing units (CPU), and other electronic devices may include internal peripherals. These peripherals may include digital or analog circuitry that is available for various parts of the MCU to perform tasks. Such internal peripherals may include, for example, counters, timers, a real-time clock, universal asynchronous receiver-transmitter (UART) interfaces, serial peripheral interfaces (SPI), or I2C interfaces.